#include "inmp441.h"
#define AUDIO_OPUS_FRAME_MS   20
#define AUDIO_OPUS_COMPLEXITY 5
#define AUDIO_OPUS_CHANNELS   1
#define AUDIO_OPUS_BITRATE    24000

#define FRAME_SAMPLES ((I2S_SAMPLE_RATE * AUDIO_OPUS_FRAME_MS) / 1000)
#define FRAME_BYTES (FRAME_SAMPLES * sizeof(int16_t) * AUDIO_OPUS_CHANNELS)

void initCodec();
int encode(int16_t *pcm_samples, uint8_t *encoded_data, int max_bytes);